// ==========================================================================
// 云捷GO自动生成路由代码，只生成一次，按需修改,再次生成不会覆盖.
// 生成日期：{{.table.CreateTime}}
// 生成路径: app/controller/{{.table.ModuleName}}/{{.table.BusinessName}}_router.go
// 生成人：{{.table.FunctionAuthor}}
// ==========================================================================
package {{.table.ModuleName}}

import (
	"github.com/gogf/gf/frame/g"
	"github.com/gogf/gf/net/ghttp"
	"{{.table.PackageName}}/app/service/middleware"
	"{{.table.PackageName}}/app/controller/{{.table.ModuleName}}/{{.table.BusinessName}}"
)

//加载路由
func init() {
	s := g.Server()
	// 参数路由
	s.Group("/{{.table.ModuleName}}/{{.table.BusinessName}}", func(group *ghttp.RouterGroup) {
		group.Middleware(middleware.Auth)
		group.GET("/", {{.table.BusinessName}}.List)
		group.POST("/list", {{.table.BusinessName}}.ListAjax)
		group.GET("/add", {{.table.BusinessName}}.Add)
		group.POST("/add", {{.table.BusinessName}}.AddSave)
		group.POST("/remove", {{.table.BusinessName}}.Remove)
		group.GET("/edit", {{.table.BusinessName}}.Edit)
		group.POST("/edit", {{.table.BusinessName}}.EditSave)
		group.ALL("/export", {{.table.BusinessName}}.Export)
	})
}
